package com.concurrent.chapter1.concurrent06;

public class MyThread extends Thread {
	private ListPool listPool;
	public MyThread(ListPool listPool) {
		super();
		this.listPool = listPool;
	}
	@Override
	public void run() {
		for (int i = 0; i < Integer.MAX_VALUE; i++) {
			String string = listPool.get();
			System.out.println(Thread.currentThread().getName() + "取值：" + string);
			listPool.put(string);
		}
	}
}
